/* 新增样式文件 */
@keyframes clipPath {
  0%, 100% { clip-path: inset(0 0 98% 0); }
  25% { clip-path: inset(0 98% 0 0); }
  50% { clip-path: inset(98% 0 0 0); }
  75% { clip-path: inset(0 0 0 98%); }
}

.react-flow__node.running-effect {

  animation: none !important;
}

.react-flow__node.running-effect::before,
.react-flow__node.running-effect::after {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border: 2px solid green;
  transition: all 0.5s;
  animation: clipPath 3s infinite linear;
  border-radius: 12px;
  pointer-events: none;
}

.react-flow__node.running-effect::after {
  animation-delay: -1.5s;
}

.node-editor {
  position: fixed;
  right: 0;
  top: 0;
  z-index: 10;
  background: #fff;
  width: 500px;
  height: 100%;
  transform: translateX(0);
  transition: transform 0.3s ease-out;
  box-shadow: -2px 0 8px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
}

.node-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid #eee;
}

.node-editor-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 24px;
  padding: 0 8px;
}

.node-editor-content {
  flex: 1;
  padding: 16px;
  overflow: auto;
}

.config-item {
  margin-bottom: 16px;
}

.config-label {
  display: block;
  margin-bottom: 8px;
}

.config-input {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-top: 8px;
}

.config-select {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-top: 8px;
  background-color: white;
}

/* 添加以下样式 */
.workflow-controls {
  position: absolute;
  top: 20px;
  z-index: 10;
  display: flex;
  gap: 8px;
}

.left-controls {
  left: 20px;
  flex-direction: row;
}

.right-controls {
  right: 20px;
  flex-direction: row;
}

.workflow-button {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.add-node-button {
  background: #fff;
  border: 1px solid #ddd !important;
}

.run-button {
  background: #2196F3;
  color: white;
}

.run-button:disabled {
  background: #90caf9;
  cursor: not-allowed;
}

.save-button {
  background: #4CAF50;
  color: white;
}

.node-palette {
  position: absolute;
  top: 60px;
  left: 20px;
  z-index: 10;
  background: #fff;
  padding: 16px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.hoverable-item {
  margin-bottom: 8px;
  cursor: pointer;
  padding: 8px;
  transition: background-color 0.2s;
}

.hoverable-item:hover {
  background-color: #f5f5f5;
}

/* New Ant Design compatible styles */
.site-layout {
  min-height: 100vh;
}

.add-node-button {
  position: absolute;
  bottom: 20px;
  right: 20px;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.node-types {
  position: absolute;
  bottom: 80px;
  right: 20px;
  background-color: white;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  padding: 8px;
  z-index: 10;
}

.node-type {
  padding: 8px 16px;
  cursor: pointer;
  border-radius: 4px;
  margin-bottom: 4px;
  transition: all 0.3s;
}

.node-type:hover, .node-type.hovered {
  background-color: #f0f0f0;
}

.node-type:last-child {
  margin-bottom: 0;
}

/* Override ReactFlow styles to match Ant Design */
.react-flow__node {
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  padding: 10px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
}

.react-flow__node-input {
  background-color: #1890ff;
  color: white;
}

.react-flow__node-default {
  background-color: white;
  border: 1px solid #d9d9d9;
}

.react-flow__node-output {
  background-color: #52c41a;
  color: white;
}

.react-flow__handle {
  width: 8px;
  height: 8px;
  background-color: #1890ff;
  border: 1px solid white;
}

.react-flow__edge-path {
  stroke: #1890ff;
  stroke-width: 2;
}

.react-flow__controls {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  border-radius: 4px;
}

.react-flow__controls-button {
  border: none;
  background-color: white;
  border-bottom: 1px solid #f0f0f0;
}

.react-flow__controls-button:hover {
  background-color: #f0f0f0;
}
